package beusoft.ccjk.com.calculator.tree;

/**
 * Created by CCJK on 2017/12/21.
 */

public class Node {

    public int key;
    public Node leftNode;
    public Node rightNode;
    public Object data;

    public Node(int key) {
        this.key = key;
    }

    private StringBuilder stringBuilder = new StringBuilder();

    @Override
    public String toString() {
//        stringBuilder.replace(0, stringBuilder.length(), "");
//        if (leftNode != null) {
//            stringBuilder.append(leftNode);
//        }
//        stringBuilder.append(key).append(" , ");
//        if (rightNode != null) {
//            stringBuilder.append(rightNode);
//        }
//        return stringBuilder.toString();

        return "" + key;
    }
}
